/**
 * Created by xiao on 2017/6/30.
 */


import Vue from "vue";
import App from "./App.vue";
import vueRouter from "vue-router";
Vue.use(vueRouter);
//图片预览组件
import VuePreview from 'vue-preview';
Vue.use(VuePreview);
//引入common
//import common from "./kits/common.js";

//引入組件
import home from "./components/home.vue";
import newslist from "./components/news/newslist.vue";
import newsinfo from "./components/news/newsinfo.vue";
import photolist from "./components/photo/photolist.vue";
import photoinfo from "./components/photo/photoinfo.vue";
import goodslist from "./components/goods/goodslist.vue";
import goodsinfo from "./components/goods/goodsinfo.vue";
import goodsdesc from "./components/goods/goodsdesc.vue";
import goodscomment from "./components/goods/goodscomment.vue"


import vueResource from "vue-resource";
Vue.use(vueResource);

var router1 = new vueRouter({
    linkActiveClass:'mui-active',
    routes:[
        {path:"/",redirect:"/home"},
        {path:"/home",component:home},
        {path:"/news/newslist",component:newslist},
        {path:"/news/newsinfo/:id",component:newsinfo},
        {path:"/photo/photolist",component:photolist},
        {path:"/photo/photoinfo/:id",component:photoinfo},
        {path:"/goods/goodslist",component:goodslist},
        {path:"/goods/goodsinfo/:id",component:goodsinfo},
        {path:"/goods/goodsdesc/:id",component:goodsdesc},
        {path:"/goods/goodscomment/:id",component:goodscomment}

    ]
})
//定义过滤器
import "mint-ui/lib/style.min.css";
import mintui from "mint-ui";
Vue.use(mintui);


import "../static/mui/css/mui.css";
import "../static/css/site.css";
import moment from "moment";
Vue.filter("datefmt",function(input,fmtstring){
	return moment(input).format(fmtstring);
})
new Vue({
    el:"#app",
    render:function(create){
        return create(App);
    },
    router:router1
    // // render:c=>c(App)
    // render:c=>c(App)
});
